////
////  CustomOfferTableViewCell.m
////  WapsDemo
////
////  Created by 万普世纪 on 14-4-10.
////
////
//
//#import "CustomOfferTableViewCell.h"
//
//#import "WPLib/WPListCustom.h"
//
//@implementation CustomOfferTableViewCell
//- (void)dealloc
//{
//    contentView = nil;
//    wapsCustom = nil;
//    self.iconImageView = nil;
//    self.appnameLable = nil;
//    self.wordsLable = nil;
//    self.typeLable = nil;
//    self.sizeLable = nil;
//    self.btn_txtButton = nil;
//    self.pointsLable = nil;
//    self.model = nil;
//    SUPER_DEALLOC;
//}
//- (void)awakeFromNib
//{
//    // Initialization code
//    
//}
//- (void)setCell:(WapsModel *)model
//{
//    self.model = model;
//    dispatch_async(dispatch_get_global_queue(0, 0), ^{
//       
//        NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:model.icon]];
//        
//        dispatch_sync(dispatch_get_main_queue(), ^{
//            self.iconImageView.layer.cornerRadius = 10;
//            self.iconImageView.layer.masksToBounds = YES;
//            self.iconImageView.image = [UIImage imageWithData:data];
//        });
//        
//    });
//    self.appnameLable.text = model.title;
//    
//    self.wordsLable.text = model.ad_words;
//    
//    self.typeLable.text = model.type;
//    
//    self.sizeLable.text = [NSString stringWithFormat:@"%@M",model.size];
//    
//    [self.btn_txtButton setTitle:model.btn_txt forState:UIControlStateNormal];
//    [self.btn_txtButton addTarget:self action:@selector(resignAndLoginClick:) forControlEvents:UIControlEventTouchUpInside];
//    self.pointsLable.text = [NSString stringWithFormat:@"送%@积分",model.points];
//}
//- (void)resignAndLoginClick:(UIButton *)button
//{
//    [self showAction:nil];
//}
//#pragma mark - 显示插屏广告
////显示插屏广告
//- (void)showAction:(id)sender
//{
//    contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 200)];
//    [contentView setBackgroundColor:[UIColor whiteColor]];
//    
//    UIImageView *iconImageView = [self createImageView:CGRectMake(5, -20, 60, 60) imageName:@""];
//    [self downLoadImage:iconImageView url:_model.icon];
//    [contentView addSubview:iconImageView];
//    
//    UILabel *appNameLable = [self createLabel:CGRectMake(70, 10, 90, 20) title:_model.title font:14];
//    appNameLable.font = [UIFont boldSystemFontOfSize:16];
//    [contentView addSubview:appNameLable];
//    
//    NSArray *array = [_model.tip componentsSeparatedByString:@"*"];
//    NSArray *array1 = [[array objectAtIndex:0] componentsSeparatedByString:@"<"];
//    NSString *str1 = [array1 objectAtIndex:0];
//    NSArray *array2 = [[array objectAtIndex:1] componentsSeparatedByString:@"<"];
//    NSString *str2 = [array2 objectAtIndex:0];
//    NSString *str3 = [NSString stringWithFormat:@"%@*%@",str1,str2];
//
//    UILabel *tipLable = [self createLabel:CGRectMake(8, 50, 270, 90) title:str3 font:14];
//    tipLable.numberOfLines = 0;
//    tipLable.layer.cornerRadius = 10;
//    tipLable.layer.masksToBounds = YES;
//    tipLable.backgroundColor = [UIColor grayColor];
//    [contentView addSubview:tipLable];
//    
//    UILabel *pointLable = [self createLabel:CGRectMake(40, 140, 80, 60) title:[NSString stringWithFormat:@"送%@积分",_model.points] font:16];
//    pointLable.backgroundColor = [UIColor clearColor];
//    pointLable.font = [UIFont boldSystemFontOfSize:15];
//    pointLable.textColor = [UIColor redColor];
//    [contentView addSubview:pointLable];
//    
//    UIButton *getButton = [self createButton:CGRectMake(135, 150, 100, 50) ImageName:@"" action:@selector(downLoad:) target:self title:@"立即获取"];
//    getButton.backgroundColor = [UIColor clearColor];
//    [contentView addSubview:getButton];
//    
//    [[KGModal sharedInstance] showWithContentView:contentView andAnimated:YES];
//}
//- (void)downLoad:(UIButton *)buton
//{
//    NSLog(@"downlaod");
//    wapsCustom = [[WPListCustom alloc] init];
//    //下载应用软件的接口
//    [wapsCustom listOnClick:self.model.click_url];
//}
////下载高清图片
//- (void)downLoadImage:(UIImageView *)imageView url:(NSString *)url
//{
//    dispatch_async(dispatch_get_global_queue(0, 0), ^{
//        
//        NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
//        
//        dispatch_sync(dispatch_get_main_queue(), ^{
//            imageView.layer.cornerRadius = 10;
//            imageView.layer.masksToBounds = YES;
//            imageView.image = [UIImage imageWithData:data];
//        });
//        
//    });
//}
////创建Button的方法
//- (UIButton *)createButton:(CGRect)frame
//                 ImageName:(NSString *)imageName
//                    action:(SEL)action
//                    target:(id)target
//                     title:(NSString *)title
//{
//    UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
//    button.frame = frame;
//    [button setTitle:title forState:UIControlStateNormal];
//    [button setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
//    [button setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
//    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
//    [button sizeToFit];
//    return button;
//}
////创建label
//- (UILabel *)createLabel:(CGRect)frame
//                   title:(NSString *)title
//                    font:(float)font
//{
//    UILabel *label = [[UILabel alloc]initWithFrame:frame];
//    label.text = title;
//    label.font = [UIFont systemFontOfSize:font];
//    //    label.adjustsFontSizeToFitWidth = YES;
//    return AUTORELEASE(label);
//}
//
////UIImageView frame image 交互
//- (UIImageView *)createImageView:(CGRect)frame
//                       imageName:(NSString *)imageName
//{
//    UIImageView *imageView = [[UIImageView alloc]initWithFrame:frame];
//    imageView.userInteractionEnabled = YES;
//    return imageView;
//}
//
//- (void)setSelected:(BOOL)selected animated:(BOOL)animated
//{
//    [super setSelected:selected animated:animated];
//
//    // Configure the view for the selected state
//}
//
//@end
